#ifndef _CGAMEPLAY_H_
#define _CGAMEPLAY_H_

#include "GameState.h"
#include "Sprite.h"
#include "Object.h"
#include "Mario.h"
#include "Land.h"
#include "PhysicalSystem.h"
#include "Map.h"
#include <vector>

using namespace std;

class CGamePlayState : public CGameState
{
private:
	CSprite* m_background;
	CMario* m_mario;
	CCamera* m_camera;
	CLand* m_land;
	CLand* m_land2;
	vector<CObject*> objectList;
	vector<CObject*> objectList2;
	CPhysicalSystem* m_physicalSystem;
	CMap* m_map1;
public:
	CGamePlayState(GameStateId gameId, CGameEngine* gameEngine) : CGameState(gameId, gameEngine)
	{
		m_mario = new CMario();
		m_land = new CLand(D3DXVECTOR2(200, 420));
		m_land2 = new CLand(D3DXVECTOR2(50, 250));
		m_physicalSystem = new CPhysicalSystem();
	}
	void Init();
	void Update(float gameTime, CInput* input);
	void Draw(LPD3DXSPRITE spriteHandler);
	void LoadObjectFromMap(CMap* map);
};

#endif